// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
    env: 'zhihuiyiliao-3gmkxujs5ab28bb1'
})
const db = cloud.database()
// 云函数入口函数
//查询
exports.main = async (event, context) => {
    return await cloud.database().collection('userInfo')
        .where({
            data: {
                _openid: event.openId
            }
        })
        .get()
        .then((res) => {
            return res
        })
}

